// JavaScript Document
function ajax(url, fnSuc,fnFail)
{
			//create ajax object
			if(window.XMLHttpRequest){
				var oAjax = new XMLHttpRequest();	
			}else
			{
				var oAjax = ActiveXObject("Microsoft.XMLHTTP");
			}
			
			//oAjax.readyState = 0 
			//connect to server
			//oAjax.open('GET', 'a.txt?t=' + new Date().getTime(), true);
			oAjax.open('GET', url, true);
			
			//send request
			oAjax.send(); 		

			
			//receive res
			oAjax.onreadystatechange=function()
			{
				if(oAjax.readyState==4){
					if(oAjax.status==200|| oAjax.status==304){
						//alert('success ' + oAjax.responseText);
						fnSuc(oAjax.responseText);
					}else{
						//alert('fail ' + oAjax.status);
						if(fnFail){
							fnFail('fail ' + oAjax.status);
						}
						
					}
				}
					
			};
}